.workflow-tasks-page {
  background-color: #f8f9fa;
  min-height: 100vh;
  padding: 2rem 0;
}

.page-header {
  margin-bottom: 2rem;
  
  .page-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
    
    i {
      margin-right: 0.5rem;
      color: #007bff;
    }
  }
  
  .page-subtitle {
    font-size: 1.1rem;
  }
  
  .user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    
    .btn-group {
      .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
      }
    }
  }
}

.tasks-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  
  .panel-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    
    h5 {
      margin: 0;
      font-weight: 600;
      
      i {
        margin-right: 0.5rem;
      }
      
      .badge {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
      }
    }
    
    .current-user-info {
      margin-top: 0.5rem;
      opacity: 0.9;
    }
  }
  
  .tasks-list {
    max-height: 60vh;
    overflow-y: auto;
  }
}

.task-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.2s ease;
  
  &:hover {
    background-color: #f8f9fa;
  }
  
  &.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
  }
  
  &:last-child {
    border-bottom: none;
  }
  
  .task-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
  }
  
  .task-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.875rem;
  }
  
  .task-info {
    flex: 1;
  }
  
  .task-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
  }
  
  .task-meta {
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
    
    .badge {
      font-size: 0.75rem;
      padding: 0.25rem 0.5rem;
    }
  }
  
  .task-description {
    margin-top: 0.5rem;
    padding-left: 2.5rem;
    font-style: italic;
  }
}

.no-tasks {
  padding: 2rem 1.5rem;
}

.task-details-panel {
  .task-info-card,
  .task-form-card {
    .card {
      border: none;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      
      .card-header {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-radius: 12px 12px 0 0;
        padding: 1rem 1.5rem;
        
        h5, h6 {
          margin: 0;
          font-weight: 600;
          
          i {
            margin-right: 0.5rem;
          }
        }
      }
      
      .card-body {
        padding: 1.5rem;
      }
    }
  }
}

.form-group {
  .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    
    i {
      margin-right: 0.5rem;
      color: #007bff;
    }
  }
  
  .form-control,
  .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    
    &:focus {
      border-color: #007bff;
      box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
  }
  
  .form-check {
    padding-left: 0;
    
    .form-check-input {
      margin-left: 0;
      margin-right: 0.5rem;
    }
    
    .form-check-label {
      font-weight: 500;
    }
  }
}

.form-actions {
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    
    &:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    i {
      margin-right: 0.5rem;
    }
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
  }
}

.no-task-selected {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instances-overview {
  .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    .card-header {
      background: linear-gradient(135deg, #28a745, #20c997);
      color: white;
      border-radius: 12px 12px 0 0;
      
      h6 {
        margin: 0;
        font-weight: 600;
        
        i {
          margin-right: 0.5rem;
        }
        
        .badge {
          background-color: rgba(255, 255, 255, 0.2);
          color: white;
        }
      }
    }
  }
}

.instance-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
  transition: all 0.2s ease;
  
  &:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .instance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    
    .instance-title {
      margin: 0;
      font-size: 1rem;
      font-weight: 600;
      color: #495057;
    }
    
    .badge {
      font-size: 0.75rem;
      padding: 0.25rem 0.5rem;
    }
  }
  
  .instance-body {
    .progress {
      border-radius: 2px;
      
      .progress-bar {
        border-radius: 2px;
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .workflow-tasks-page {
    padding: 1rem 0;
  }
  
  .page-header {
    .row {
      flex-direction: column;
      gap: 1rem;
    }
    
    .col-md-6 {
      text-align: center !important;
    }
    
    .user-actions {
      justify-content: center;
      flex-direction: column;
      gap: 0.5rem;
      
      .btn {
        width: 100%;
      }
      
      .btn-group {
        width: 100%;
        
        .btn {
          flex: 1;
        }
      }
    }
  }
  
  .row {
    flex-direction: column;
  }
  
  .col-md-4,
  .col-md-8 {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .tasks-panel {
    .tasks-list {
      max-height: 40vh;
    }
  }
  
  .task-item {
    .task-header {
      flex-direction: column;
      align-items: flex-start;
      
      .task-icon {
        margin-bottom: 0.5rem;
        margin-right: 0;
      }
    }
    
    .task-description {
      padding-left: 0;
    }
  }
  
  .instances-overview {
    .row {
      .col-md-4 {
        width: 100%;
      }
    }
  }
} 